package org.particlethink.request;

import io.swagger.v3.oas.annotations.media.Schema;
import org.particlethink.aop.Id;
import org.particlethink.entry.PlanStatus;
import org.particlethink.model.MasterPlan;
import org.particlethink.response.UserTokenAndRoleResponse;

import java.util.Date;
import java.util.List;

public class MasterPlanRequest {
    @Id
    @Schema(description = "项目ID")
    private int projectId;//项目ID
    @Schema(description = "总计划大类")
    private String masterPlanCategoryId;//总计划大类

    @Schema(description = "备注")
    private String remark;//备注
    @Schema(description = "创建人")
    private int creatorId;//创建人
    @Schema(description = "附件")
    private String attachment;//附件
    @Schema(description = "附件名")
    private String attachmentName;//附件


    @Schema(description = "是否提交")
    private boolean isSubmit;


    @Schema(description = "物料")
    private List<PlanMaterialRequest> planMaterialRequests;


    public MasterPlan toMasterPlan(int creatorId,String no) {
        return new MasterPlan(projectId, masterPlanCategoryId, remark, creatorId, attachment, attachmentName,no);
    }

    public void updateMasterPlan(MasterPlan masterPlan) {
        masterPlan.setMasterPlanCategoryId(masterPlanCategoryId);
        masterPlan.setRemark(remark);
        masterPlan.setAttachment(attachment);
        masterPlan.setAttachmentName(attachmentName);
        masterPlan.setCreatorId(creatorId);
    }

    public List<PlanMaterialRequest> getPlanMaterialRequests() {
        return planMaterialRequests;
    }


    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public String getMasterPlanCategoryId() {
        return masterPlanCategoryId;
    }

    public void setMasterPlanCategoryId(String masterPlanCategoryId) {
        this.masterPlanCategoryId = masterPlanCategoryId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(int creatorId) {
        this.creatorId = creatorId;
    }


    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public void setPlanMaterialRequests(List<PlanMaterialRequest> planMaterialRequests) {
        this.planMaterialRequests = planMaterialRequests;
    }

    public boolean isSubmit() {
        return isSubmit;
    }

    public void setIsSubmit(boolean submit) {
        isSubmit = submit;
    }

    public String getAttachmentName() {
        return attachmentName;
    }

    public void setAttachmentName(String attachmentName) {
        this.attachmentName = attachmentName;
    }
}
